#include "SandboxApp.h"
#include <imgui/imgui.h>

#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include "Core/entryPoint.h"

#include "ProjectSandbox.h"

bool isDesktop = false;

SandboxApp::SandboxApp(const CC::ApplicationSpecification& specification)
    :CC::Application(specification)
{

    GetWindow().SetIsDesktopFlag(false); //for keyborad listen

    appScene = new CC::Scene();
    appScene->LoadFont(PATHCONFIG("assets/fonts/Alimama_DongFangDaKai_Regular.ttf"), "Alimama_DongFangDaKai_Regular");
   
    PushLayer(new ProjectSandbox("3DFolderBrowser", appScene));

    CC_INFO("  XX-Vendor: {%s}\n", glGetString(GL_VENDOR));
    CC_INFO("  XX-Renderer: {%s}\n", glGetString(GL_RENDERER));
    CC_INFO("  XX-Version: {%s}\n", glGetString(GL_VERSION)); 
}

SandboxApp::~SandboxApp()
{
    if(appScene) delete appScene;
}

CC::Application* CC::CreateApplication(CC::ApplicationCommandLineArgs args){
    CC::Log::SetLogLevel(CC::Log::LogLevel_Info);

    CC::ApplicationSpecification _ApplicationSpecification = { "3DFolderBrowser", "", args, 800, 600, true, false, true};
	return new SandboxApp(_ApplicationSpecification);
}